<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>个人日常事务管理系统</title>

    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/dashboard.css" rel="stylesheet">
    <link href="http://cdn.bootcss.com/font-awesome/4.6.0/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/css/style.css">
    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
    <style>
        body {
            height: 100%;
        }

        label {
            color: #9d9d9d;
            position: relative;
            top: 15px;
        }

        .top {
            color: #9d9d9d;
            margin-right: 20px;
            font-size: 13px;

        }

        .top:hover {
            color: #fff;
            text-decoration: none;

        }

        .top:hover .glyphicon {
            color: #fff;
        }

        .sidebar {
            width: 220px;
            background: #2e363f;
            overflow: hidden;
        }

        .breadcrumb {
            position: fixed;
            width: 100%;
            margin-top: 0;
            z-index: 20;
            background: #e8e8e8;
            margin-left: 220px;
            overflow: hidden;

        }

        .breadcrumb a {
            color: #000;
        }

        .breadcrumb .active a {
            color: #777;
        }

        .breadcrumb li a:hover {
            text-decoration: none;
        }

        #content {
            margin-left: 300px;
            margin-right: 0;
            margin-top: 50px;

            width: auto;
            height: 550px;

        }

        iframe {
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body style="">
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">

            <a class="navbar-brand" href="#" style="color:#a4d3ee;margin-left: 10px;font-size:23px">个人日常事务管理系统</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a class="top" href="#"><i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;欢迎你</a></li>
                <li>
                    <a class="top">
                        <p th:text="${#httpSession.getAttribute(#httpSession.getId()).username}"></p>
                    </a>
                </li>
                <li><a class="top" href="#"><i class="glyphicon glyphicon-envelope"></i>&nbsp;&nbsp;我的信息</a></li>
                <li><a class="top" href="logout"><i class="glyphicon glyphicon-off"></i>&nbsp;&nbsp;退出系统</a></li>
            </ul>

        </div>
    </div>
</nav>
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
            <ul id="accordion" class="accordion">
                <li class="active">
                    <div class="link"><i class="fa fa-home"></i>控制面板</div>
                </li>
                <li>
                    <div class="link">人员管理<i class="fa fa-chevron-down"></i></div>
                    <ul class="submenu">
                        <li><a href="/userlist" target="content">用户信息管理</a></li>
                        <li><a href="/userContent1" target="content">HTML</a></li>
                        <li><a href="/userIndex" target="content">CSS</a></li>
                        <li><a href="#">Maquetacion web</a></li>
                    </ul>
                </li>
                <li>
                    <div class="link">部门管理<i class="fa fa-chevron-down"></i></div>
                    <ul class="submenu">
                        <li><a href="#">Javascript</a></li>
                        <li><a href="#">Frameworks javascript</a></li>
                    </ul>
                </li>
                <li>
                    <div class="link">考勤管理<i class="fa fa-chevron-down"></i></div>
                    <ul class="submenu">
                        <li><a href="#">Tablets</a></li>
                        <li><a href="#">Dispositivos mobiles</a></li>
                        <li><a href="#">Medios de escritorio</a></li>
                        <li><a href="#">Otros dispositivos</a></li>
                    </ul>
                </li>
                <li style="border-bottom: 1px solid #37414b;">
                    <div class="link">基础数据管理<i class="fa fa-chevron-down"></i></div>
                    <ul class="submenu">
                        <li><a href="#">Google</a></li>
                        <li><a href="#">Bing</a></li>
                        <li><a href="#">Yahoo</a></li>
                        <li><a href="#">Otros buscadores</a></li>
                    </ul>
                </li>
                <li>
                    <div class="link">工资管理<i class="fa fa-chevron-down"></i></div>
                    <ul class="submenu">
                        <li><a href="#">Google</a></li>
                        <li><a href="#">Bing</a></li>
                        <li><a href="#">Yahoo</a></li>
                        <li><a href="#">Otros buscadores</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</div>
<!--  导航 -->

<ul class="breadcrumb" id="bread">
    <li><a href=""><i class="fa fa-home"></i>首页</a></li>
</ul>
<!-- 展示内容 -->
<div id="content">
    <iframe src="/userlist" frameborder="0" id="iframe" name="content" scrolling="yes"></iframe>
</div>

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
<script src="/js/index.js"></script>
<script>

    $(function () {
        $(".submenu li a").click(function () {
            $(".submenu li a").removeClass("add");
            $(this).addClass("add");
            var name = $(this).html();
            var text = $(this).parent().parent().siblings("div").text();
            // $(".breadcrumb .active").remove();
            $("#bread").html("");
            $("#bread").append("<li><a href=''><i class='fa fa-home'></i>首页</a></li>");
            $("#bread").append("<li><a>" + text + "</a></li>");
            $("#bread").append("<li><a href='#'>" + name + "</a></li>");
            $(".breadcrumb li:last").addClass("active");
        });

    })
</script>
</body>
</html>